#include "../common/common.hpp"
#include "../common/cpu.hpp"
#include "../common/dump.hpp"
#include "../common/io.hpp"
#include "../common/sys_common.hpp"
#include "../common/timer1.hpp"

int main() {
  // launch some task to occupy cpu and memory
  // for (int i = 0; i < 5; i++)
  //     std::thread([]
  //         {
  //             std::this_thread::sleep_for(std::chrono::milliseconds(10));
  //         }).detach();

  // int current_pid = GetCurrentPid(); // or you can set a outside program pid
  // float cpu_usage_ratio = GetCpuUsageRatio(current_pid);
  // float memory_usage = GetMemoryUsage(current_pid);

  // while (true)
  // {
  //     std::cout << "current pid: " << current_pid << std::endl;
  //     std::cout << "cpu usage ratio: " << cpu_usage_ratio * 100 << "%" <<
  //     std::endl; std::cout << "memory usage: " << memory_usage << "MB" <<
  //     std::endl;

  //     std::this_thread::sleep_for(std::chrono::milliseconds(1000));
  // }

  // test_sched();
  // testTimer();
  // testEpollTimer();
  testTimeWheel();
  // testPollFd();
  // testMemfd();
  // testDump();

  // testPoll();
  return 0;
}